package com.ruoyi.project.income.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.income.mapper.BinsMerchantRecodeMapper;
import com.ruoyi.project.income.domain.BinsMerchantRecode;
import com.ruoyi.project.income.service.IBinsMerchantRecodeService;

/**
 * 商户体现记录Service业务层处理
 * 
 * @author administrator
 * @date 2025-04-03
 */
@Service
public class BinsMerchantRecodeServiceImpl implements IBinsMerchantRecodeService 
{
    @Autowired
    private BinsMerchantRecodeMapper binsMerchantRecodeMapper;

    /**
     * 查询商户体现记录
     * 
     * @param merchantDeptId 商户体现记录主键
     * @return 商户体现记录
     */
    @Override
    public BinsMerchantRecode selectBinsMerchantRecodeByMerchantDeptId(Long merchantDeptId)
    {
        return binsMerchantRecodeMapper.selectBinsMerchantRecodeByMerchantDeptId(merchantDeptId);
    }

    /**
     * 查询商户体现记录列表
     * 
     * @param binsMerchantRecode 商户体现记录
     * @return 商户体现记录
     */
    @Override
    public List<BinsMerchantRecode> selectBinsMerchantRecodeList(BinsMerchantRecode binsMerchantRecode)
    {
        return binsMerchantRecodeMapper.selectBinsMerchantRecodeList(binsMerchantRecode);
    }

    /**
     * 新增商户体现记录
     * 
     * @param binsMerchantRecode 商户体现记录
     * @return 结果
     */
    @Override
    public int insertBinsMerchantRecode(BinsMerchantRecode binsMerchantRecode)
    {
        binsMerchantRecode.setCreateTime(DateUtils.getNowDate());
        return binsMerchantRecodeMapper.insertBinsMerchantRecode(binsMerchantRecode);
    }

    /**
     * 修改商户体现记录
     * 
     * @param binsMerchantRecode 商户体现记录
     * @return 结果
     */
    @Override
    public int updateBinsMerchantRecode(BinsMerchantRecode binsMerchantRecode)
    {
        binsMerchantRecode.setUpdateTime(DateUtils.getNowDate());
        return binsMerchantRecodeMapper.updateBinsMerchantRecode(binsMerchantRecode);
    }

    /**
     * 批量删除商户体现记录
     * 
     * @param merchantDeptIds 需要删除的商户体现记录主键
     * @return 结果
     */
    @Override
    public int deleteBinsMerchantRecodeByMerchantDeptIds(Long[] merchantDeptIds)
    {
        return binsMerchantRecodeMapper.deleteBinsMerchantRecodeByMerchantDeptIds(merchantDeptIds);
    }

    /**
     * 删除商户体现记录信息
     * 
     * @param merchantDeptId 商户体现记录主键
     * @return 结果
     */
    @Override
    public int deleteBinsMerchantRecodeByMerchantDeptId(Long merchantDeptId)
    {
        return binsMerchantRecodeMapper.deleteBinsMerchantRecodeByMerchantDeptId(merchantDeptId);
    }
}
